package com.bokee.archerwq.lab.array;

import java.util.ArrayList;
import java.util.List;

public class TestArrayCasting {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		List<SettingInfo> settingList = new ArrayList<SettingInfo>();
		settingList.add(new SettingInfo("1", "100001"));
		settingList.add(new SettingInfo("2", "100002"));
		settingList.add(new SettingInfo("3", "100003"));
		settingList.add(new SettingInfo("4", "100004"));

		SettingInfo[] settings = (SettingInfo[]) settingList.toArray();
		System.out.println(settings.length);
	}

}

class SettingInfo {
	private String id;
	private String ringId;

	public SettingInfo(String id, String ringId) {
		this.id = id;
		this.ringId = ringId;
	}

	/**
	 * @return the id
	 */
	public String getId() {
		return id;
	}

	/**
	 * @param id
	 *            the id to set
	 */
	public void setId(String id) {
		this.id = id;
	}

	/**
	 * @return the ringId
	 */
	public String getRingId() {
		return ringId;
	}

	/**
	 * @param ringId
	 *            the ringId to set
	 */
	public void setRingId(String ringId) {
		this.ringId = ringId;
	}

}
